/*
 *  $Id: SwornEnemy.cs 975 2009-12-16 17:13:22Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Affects {
    /// <summary>
    /// Эффект: заклятый враг
    /// Параметры: раса и увеличение атаки
    /// Против существ указанной расы атака увеличивается на Х.
    /// </summary>
    public class SwornEnemy: ConditionalModDamage {
        public readonly Race EnemyRace;

        public SwornEnemy(Race enemyRace, int value): base(value) {
            EnemyRace = enemyRace;
        }

        public override string Id {
            get { return "sworn_enemy"; }
        }
        public override string NameText {
            get { return Name.GetText(EnemyRace); }
        }

        public override int BaseWeight {
            get { return Value * 10; }
        }

        public override AffectIcon Icon {
            get { return AffectIcon.SwornEnemy; }
        }

        public override bool Dispellable {
            get { return false;}
        }

        public override string DescriptionText {
            get { return Description.GetText(Value, EnemyRace); }
        }

        public override Affect Clone() {
            return new SwornEnemy(EnemyRace, Value);
        }

        public override bool Accept(Creature hitter, AbstractObject victim) {
            return victim.Race.IsRace(EnemyRace);
        }
    }
}